export default ({ body, state, scripts }) => {
    return `
  <!DOCTYPE html>
  <html>
  <head>
    <title>${process.env.title}</title>
    <meta charSet="utf-8" />
    <meta httpEquiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <link rel="preload" as="style" href="${process.env.publicPath}index.css" onload="this.rel='stylesheet'" />
    <script>
        window.onerror = function (error) {
            console.log("window捕获到异常", error);
        }
    </script>
  </head>
  <body>
    <div id="app">${body}</div>
    <script src="${process.env.publicPath}vendor_dll.js"></script>
    <script src="/state/${state}.js"></script>
    <script src="${process.env.publicPath}runtime.js"></script>
    <script src="${process.env.publicPath}index.js"></script>
    ${scripts.join('')}
    <script>window.main()</script>
  </body>
  </html>
  `;
};